<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title> prepend활용  </title>
<!-- jQuery library -->
<script src="jquery-1.7.2.min.js"></script>
<style>
  img {padding:0px; margin:5px;}
</style>
</head>
 
<body>

<div id="container">
	<img src='pic1.jpg' alt='' width='100' height='100' />
	<img src='pic2.jpg' alt='' width='100' height='100' />
	<img src='pic3.jpg' alt='' width='100' height='100' />
</div>
<p> prepend를 사용하여 사진을 순환합니다. </p>
<button id ="prepend"   title="prepend">prepend</button>
<!---------- jQuery code Start ---------->
<script>
 
$("button#prepend").click(function(e) {
    $("div#container").prepend( $("div#container img:last") );
});


</script>

</body>
</html>
